﻿<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="cardAdmin.aspx.vb" Inherits="projectBiome.cardAdmin" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
    Sub MySub1(ByVal sender As Object, _
                        ByVal e As EventArgs)
        MySub()
    End Sub

</script>
        
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
        .style1
        {
            font-family: Arial;
            font-size: small;
        }
        .style2
        {
            background-color: #FFFFFF;
            text-align: left;
        }
        .style3
        {
            height: 3px;
            text-align: left;
        }
    </style>
     <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
  <script type = "text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
  <script type = "text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
  <script type ="text/javascript">
      $(document).ready(function () {
          $("#accordion").accordion();
      });
  </script>
</head>
<body>

    <form id="form1" runat="server">
    
        <h1 style="background-color: #CCCCCC">
            Card Administration</h1>
        <center>
            <asp:Image ID="Image1" runat="server" Height="149px" 
                ImageUrl="../images/img_environment_header.jpg" 
                Width="408px" />
        </center>
        <p style="text-align: left; background-color: #CCCCCC">
            <asp:LinkButton ID="LinkButton1" runat="server" 
                PostBackUrl="~/Admin/indexAdmin.aspx">Index</asp:LinkButton>
&nbsp;&gt;
            <asp:LinkButton ID="LinkButton2" runat="server" 
                PostBackUrl="~/Admin/systemAdmin.aspx">System</asp:LinkButton>
        &nbsp;&gt; Card Administration</p>
        <p style="background-color: #FFFFFF">
            &nbsp;</p>
    <div id="accordion">
	<h3><a href="1">Add A New Card</a></h3>
	<div>
		    <table style="width:100%;">
                <tr>
                    <td class="style2">
                        Card Name:</td>
                    <td style="background-color: #FFFFFF">
                        <asp:TextBox ID="cardNameTxt" runat="server"></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td style="text-align: left">
                        Card Description:</td>
                    <td>
                        <asp:TextBox ID="cardDescriptionAddTxt" runat="server"></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td style="text-align: left">
                        Card Instructions:</td>
                    <td>
                        <asp:TextBox ID="cardInstructionsAddTxt" runat="server"></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td style="text-align: left">
                        Card 
                        Category:</td>
                    <td>
                        <asp:ListBox ID="cardCategoryLstBx" runat="server" DataSourceID="BiomeDataSource" 
                            DataTextField="CategoryName" DataValueField="CardCategoryID" Width="122px" 
                            Height="68px">
                        </asp:ListBox>
                        <asp:SqlDataSource ID="BiomeDataSource" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:FA11_4396_allConnectionString %>" 
                            
                            SelectCommand="SELECT [CardCategoryID], [CategoryName] FROM [CardCategory]">
                        </asp:SqlDataSource>
                    </td>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td class="style3">
                        Must Play:</td>
                    <td class="style3">
                        <asp:DropDownList ID="mustPlayDrpLst" runat="server">
                            <asp:ListItem>Choose Item</asp:ListItem>
                            <asp:ListItem>True</asp:ListItem>
                            <asp:ListItem>False</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                    <td class="style3">
                        &nbsp;</td>
                </tr>
                <tr>
                    <td style="text-align: left">
                        Card Effect:</td>
                    <td>
                        <asp:DropDownList ID="cardEffectDDL" runat="server" DataSourceID="effect" 
                            DataTextField="EffectTitle" DataValueField="EffectID">
                        </asp:DropDownList>
                        <asp:SqlDataSource ID="effect" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:FA11_4396_allConnectionString %>" 
                            SelectCommand="SELECT * FROM Effect"></asp:SqlDataSource>
                    </td>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td style="text-align: left">
                        Construct Type</td>
                    <td>
                        <asp:DropDownList ID="constructTypeDDL" runat="server" 
                            DataSourceID="ConstructType" DataTextField="ConstructTypeName" 
                            DataValueField="ConstructTypeID">
                        </asp:DropDownList>
                        <asp:SqlDataSource ID="ConstructType" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:FA11_4396_allConnectionString %>" 
                            SelectCommand="SELECT * FROM ConstructType"></asp:SqlDataSource>
                    </td>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td>
                        Play Attribute:</td>
                    <td>

                        <asp:DropDownList ID="playAttributeDDL" runat="server" 
                            DataSourceID="PlayAttribute" DataTextField="PlayAttributeName" 
                            DataValueField="PlayAttributeID">
                        </asp:DropDownList>
                        <asp:SqlDataSource ID="PlayAttribute" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:FA11_4396_allConnectionString %>" 
                            SelectCommand="SELECT * FROM [PlayAttribute]"></asp:SqlDataSource>
                    </td>
                    <td>

                        &nbsp;</td>
                </tr>
                <tr>
                    <td>
                        Operation</td>
                    <td>

                        <asp:Button ID="saveCard" runat="server" Text="Save" Width="130px" OnClick="insertCard"/><br>
                        <asp:Button ID="cancelBtn" runat="server" Text="Cancel" Width="130px" />
                    </td>
                    <td>

                        &nbsp;</td>
                </tr>
            </table>
		
		
	</div>
	<h3><a href="#">Modify Card</a></h3>
	<div>
    
		<div style="width: 1000px">
            <table style="width:100%;">
                <tr>
                    <td style="text-align: left">
                        Choose Card:</td>
                    <td>
                    <asp:ScriptManager ID="SM1" runat="server" />
                    <asp:UpdatePanel ID="chooseCardDDLPanel" runat="server">
                    <ContentTemplate>
                        <asp:DropDownList ID="chooseCardDrpLst" runat="server" 
                            DataSourceID="SqlDataSource2" DataTextField="CardName" 
                            DataValueField="CardID" AutoPostBack="True">
                            <asp:ListItem>Select a Card...</asp:ListItem>
                        </asp:DropDownList>
                        <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:FA11_4396_allConnectionString %>" 
                            SelectCommand="SELECT [CardID], [CardName] FROM [Card]"></asp:SqlDataSource>
                         

                        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:FA11_4396_allConnectionString %>" 
                            SelectCommand="SELECT [CardID], [CardName] FROM [Card]"></asp:SqlDataSource>

                               </ContentTemplate>
                            </asp:UpdatePanel>
                    </td>
                </tr>
                <tr>
                    <td style="text-align: left">
                        Card Name:</td>
                    <td>
                    <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                    <ContentTemplate>
                        <asp:TextBox ID="cardNameModTxt" runat="server"></asp:TextBox>
                        </ContentTemplate>
                        </asp:UpdatePanel>
                    </td>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td style="text-align: left">
                        Card Description:</td>
                    <td>
                     <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                    <ContentTemplate>
                        <asp:TextBox ID="cardDescriptionModTxt" runat="server"></asp:TextBox>
                    </ContentTemplate>
                    </asp:UpdatePanel>
                    </td>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td style="text-align: left">
                        Card Instructions:</td>
                    <td>
                     <asp:UpdatePanel ID="UpdatePanel3" runat="server">
                    <ContentTemplate>
                        <asp:TextBox ID="cardInstrModTxt" runat="server"></asp:TextBox>
                    </ContentTemplate>
                    </asp:UpdatePanel>
                    </td>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td style="text-align: left">
                        Construct Type:</td>
                    <td>
                     <asp:UpdatePanel ID="UpdatePanel4" runat="server">
                    <ContentTemplate>
                        <asp:DropDownList ID="constructTypeModDDL" runat="server" 
                            DataSourceID="ConstructType" DataTextField="ConstructTypeName" 
                            DataValueField="ConstructTypeID">
                        </asp:DropDownList>
                        </ContentTemplate>
                        </asp:UpdatePanel>
                    </td>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td style="text-align: left">
                        Play Attribute:</td>
                    <td>
                     <asp:UpdatePanel ID="UpdatePanel5" runat="server">
                    <ContentTemplate>
                        <asp:DropDownList ID="playAttributeDDL0" runat="server" 
                            DataSourceID="PlayAttribute" DataTextField="PlayAttributeName" 
                            DataValueField="PlayAttributeID">
                        </asp:DropDownList>
                        </ContentTemplate>
                        </asp:UpdatePanel>
                    </td>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td style="text-align: left">
                        Must Play</td>
                    <td>
                     <asp:UpdatePanel ID="UpdatePanel6" runat="server">
                    <ContentTemplate>
                        <asp:DropDownList ID="mustPlayDrpLstMod" runat="server">
                            <asp:ListItem>Choose Item</asp:ListItem>
                            <asp:ListItem>True</asp:ListItem>
                            <asp:ListItem>False</asp:ListItem>
                        </asp:DropDownList>
                        </ContentTemplate>
                        </asp:UpdatePanel>
                    </td>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td style="text-align: left">
                     Card Categories:</td>
                    <td>
                     <asp:UpdatePanel ID="UpdatePanel7" runat="server">
                    <ContentTemplate>
                        <asp:ListBox ID="cardCategoriesModLstBx" runat="server" DataSourceID="datacategories" 
                            DataTextField="CategoryName" DataValueField="CardCategoryID"></asp:ListBox>
                        <asp:SqlDataSource ID="datacategories" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:FA11_4396_allConnectionString %>" 
                            SelectCommand="SELECT [CardCategoryID], [CategoryName] FROM [CardCategory]">
                        </asp:SqlDataSource>
                        </ContentTemplate>
                        </asp:UpdatePanel>
                    </td>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td style="text-align: left">
                        Must Play:</td>
                    <td>
                     <asp:UpdatePanel ID="UpdatePanel8" runat="server">
                    <ContentTemplate>
                        <asp:DropDownList ID="mustPlayModDrpLst" runat="server">
                            <asp:ListItem>Choose Item</asp:ListItem>
                            <asp:ListItem>True</asp:ListItem>
                            <asp:ListItem>False</asp:ListItem>
                        </asp:DropDownList>
                        </ContentTemplate>
                        </asp:UpdatePanel>
                    </td>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td>
                        &nbsp;</td>
                    <td>
                     <asp:UpdatePanel ID="UpdatePanel9" runat="server">
                    <ContentTemplate>
                        <asp:Button ID="saveModCard" runat="server" Text="Save" Width="100px" />
                        </ContentTemplate>
                        </asp:UpdatePanel>
                         <asp:UpdatePanel ID="UpdatePanel10" runat="server">
                    <ContentTemplate>
                        <asp:Button ID="removeCard" runat="server" Text="Remove"/>
                        </ContentTemplate>
                        </asp:UpdatePanel>
                    </td>
                    <td>
                        &nbsp;</td>
                </tr>
            </table>
        </div>
		<p>
		    &nbsp;</p>
	</div>

</div>
    </div>
    </form>
</body>
</html>
